package com.itheima.sys.dto;

import java.io.Serializable;
import java.util.List;

import com.itheima.common.entity.MyAuthority;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author itheima
 * @since 2020-12-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysRoleDTO extends MyAuthority implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id id
     */
    private Long id;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 角色描述
     */
    private String roleDesc;

    private Long companyId;

    //当前角色包含的权限
    private List<SysFunctionDTO> sysFunctionAbbrList;


    @Override
    public String getAuthority() {
        return roleName;
    }
}
